close[x]


PHP

PHP-Home PHP-Environment Setup PHP-Syntax PHP-Run PHP in XAMPP PHP-Variable PHP-Comment PHP-Datatype PHP-String PHP-Operators PHP-Decision PHP-loop PHP-Get/Post PHP-Do While loop PHP-While loop PHP-For loop PHP-Foreach loop PHP-Array PHP-Multidimensional Arrays PHP-Associative Arrays PHP-Indexed Arrays PHP-Function PHP-Cookies. PHP-Session PHP-File upload PHP-Email PHP-Data & Time PHP-Include & Require PHP-Error PHP-File I/O PHP-Read File PHP-Write File PHP-Append & Delete File PHP-Filter PHP-Form Validation PHP-MySQl PHP-XML PHP-AJAX



learncodehere.com



PHP - Comments

  • PHP comments are a piece of code which is ignored by any web browser.
  • PHP comment allows developers to leave notes about their code.
  • It is a good practice to add comments into your PHP code, especially in complex documents
  • Comments starts with a #, // ,/* ...*/ and PHP will ignore them

  • Example : PHP Comment

    
    <?php 
    // This is comment 1 
    $str="hello string";  
    $x=123; 
    # This is comment 2 
    $y=345.6; 
    /*
    This is comment 3
    This is comment 4
    This is comment 5
    This is comment 6
    */
    echo "string is: $str 
    "; echo "integer is: $x
    "; echo "float is: $y
    "; ?>